import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { DefaultComponent } from '@layout/default/default.component';

const routes: Routes = [
  {
    path: '',
    component: DefaultComponent,
    children: [
      {
        path: 'race',
        loadChildren: () => import('./race/race.module').then(mod => mod.RaceModule),
        data: { breadcrumb: '种族' }
      },
      {
        path: 'profession',
        loadChildren: () => import('./profession/profession.module').then(mod => mod.ProfessionModule),
        data: { breadcrumb: '职业' }
      },
      {
        path: 'user',
        loadChildren: () => import('./user/user.module').then(mod => mod.UserModule),
        data: { breadcrumb: '用户' }
      },
      {
        path: 'permission',
        loadChildren: () => import('./permission/permission.module').then(mod => mod.PermissionModule),
        data: { breadcrumb: '权限' }
      },
    ]
  },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class RoutesRoutingModule { }
